<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateResumeTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('resume', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name')->comment('姓名');
            $table->unsignedInteger('country_code')->comment('国家区号');
            $table->string('phone')->comment('手机');
            $table->string('email')->comment('电子邮箱');
            $table->string('wechat')->comment('微信');
            $table->unsignedInteger('sex')->default(3)->comment('性别 1男,2女,3不详');
            $table->timestamp('birthday')->comment('出生年月');
            $table->unsignedInteger('nationality')->comment('国籍');
            $table->string('living')->comment('现居地');
            $table->unsignedTinyInteger('education')->comment('学历');
            $table->unsignedTinyInteger('experience')->comment('工作经验');
            $table->unsignedInteger('position')->comment('求职职位');
            $table->unsignedTinyInteger('state')->comment('求职状态');
            $table->unsignedTinyInteger('country')->comment('期待国家');
            $table->unsignedTinyInteger('salary')->comment('期待月薪');
            $table->unsignedTinyInteger('coming')->comment('到岗时间');
            $table->text('brief')->comment('一句话介绍');
            $table->text('attachment')->comment('附件简历');
            $table->unsignedInteger('uid')->nullable()->index()->comment('创建者');
            $table->unsignedInteger('assign')->nullable()->index()->comment('归属用户');
            $table->unsignedInteger('assign_time')->nullable()->comment('归属到期时间');
            $table->unsignedTinyInteger('share')->default(1)->comment('是否共享');
            $table->tinyInteger('status')->default(1)->index()->comment('状态：-1删除，0禁用，1启用');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('resume');
    }
}
